﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace WebApplication.BaseClass
{
    

    public class RequestMessageEventBase : RequestMessageBase, IRequestMessageEventBase
    {
        public override RequestMsgType MsgType
        {
            get
            {
                return RequestMsgType.Event;
            }
        }
        /// <summary>
        /// 事件类型
        /// </summary>
        public virtual Event Event
        {
            get { return Event.CLICK; }
        }

        /// <summary>
        /// 事件KEY值，与自定义菜单接口中的Key值对应
        /// </summary>
        public string EventKey { get; set; }
    }

    /// <summary>
    /// 关注事件
    /// </summary>
    public class RequestMessageEvent_Subscribe:RequestMessageEventBase,IRequestMessageEventBase
    {
        public override Event Event
        {
            get
            {
                return Event.subscribe;
            }
        }
    }

    /// <summary>
    /// 取消关注事件
    /// </summary>
    public class RequestMessageEvent_Unsubscribe:RequestMessageEventBase,IRequestMessageEventBase
    {
        public override Event Event
        {
            get
            {
                return Event.unsubscribe;
            }
        }
    }
    /// <summary>
    /// 二维码的参数
    /// </summary>
    public class RequestMessageEvent_Scan:RequestMessageEventBase,IRequestMessageEventBase
    {
        public override Event Event
        {
            get
            {
                return Event.scan;
            }
        }
        public string Ticket { get; set; }
    }


    public class RequestMessageEvent_Location:RequestMessageEventBase,IRequestMessageEventBase
    {
        public override Event Event
        {
            get
            {
                return Event.LOCATION;
            }
        }
        /// <summary>
        /// 地理位置纬度
        /// </summary>
        public double Latitude { get; set; }
        /// <summary>
        /// 地理位置经度
        /// </summary>
        public double Longitude { get; set; }
        /// <summary>
        /// 地理位置精度
        /// </summary>
        public double Precision { get; set; }

    }

    /// <summary>
    /// 自定义菜单单击事件
    /// </summary>
    public class RequestMessageEvent_Click : RequestMessageEventBase, IRequestMessageEventBase
    {
        public override Event Event
        {
            get { return Event.CLICK; }
        }
    }
}